package com.agricultural.command;

import com.agricultural.equipment.AgriculturalEquipment;

public class RefuelCommand implements Command {
    private AgriculturalEquipment equipment;

    public RefuelCommand(AgriculturalEquipment equipment) {
        this.equipment = equipment;
    }

    @Override
    public void execute() {
        System.out.println("执行加油命令: " + equipment.getEquipmentId());
        equipment.refuel();
    }

    @Override
    public void undo() {
        System.out.println("撤销加油命令: " + equipment.getEquipmentId());
        equipment.consumeFuel(50);
    }

    @Override
    public String getDescription() {
        return equipment.getEquipmentId() + " 加油";
    }
}    